package com.example.farmeri.tools;

import com.example.farmeri.pojo.Farm;
import com.example.farmeri.pojo.FarmDataT;

import java.util.List;

public class ResponseUtilsFarmData {

    //请求成功2xx
    //请求成功并且返回有数据
    public final static Integer CODE_SUCCESS = 200;
    //请求成功但是返回数据为空
    public final static Integer CODE_SUCCESS_NODATA = 201;

    //请求失败4xx
    //请求失败
    public final static Integer CODE_FAILURE = 400;


    //返回状态码
    Integer code = null;

    //返回信息
    String message = null;

    //返回数据(Json格式)
    FarmDataT data = null;


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public FarmDataT getData() {
        return data;
    }

    public void setData(FarmDataT data) {
        this.data = data;
    }


    @Override
    public String toString() {
        return "ResponseUtils{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data='" + data + '\'' +
                '}';
    }
}
